#ifndef FILEHANDLER_H
#define FILEHANDLER_H



#include "fileutils_global.h"



#include <AbstractSerializer.h>
#include <ItemRoot.h>
#include <QObject>
#include <QPointer>



class FILEUTILSSHARED_EXPORT FileHandler : public QObject
{
    Q_OBJECT

public:

    static void installSerializer(AbstractSerializer* serializer);

    static bool save(ItemRoot* item, const QString& file_path);
    static ItemRoot* open(const QString& file_path);



protected:

    FileHandler(QObject *parent = 0);

    static FileHandler* instance();

    QPointer<AbstractSerializer> m_serializer;


};

#endif // FILEHANDLER_H
